import http from '@/http/interceptor'

// 文章
let BASE_CONTENT = '/book'

/** 获取详情 **/
export function getUserInfo() {
	return http({
		url: BASE_CONTENT + '/info/user',
		method: 'get',
		params: http.queryData()
	})
}
export function getInfo() {
	return http({
		url: BASE_CONTENT + '/info',
		method: 'get',
		params: http.queryData()
	})
}

/** 获取热度列表 **/
export function getUserHeat(number = 10) {
	return http({
		url: BASE_CONTENT + '/heat/user',
		method: 'get',
		params: http.queryData(number)
	})
}
export function getHeat(number = 20) {
	return http({
		url: BASE_CONTENT + '/heat',
		method: 'get',
		params: http.queryData(number)
	})
}

/** 获取列表 **/
export function getUserList(data = {}) {
	return http({
		url: BASE_CONTENT + '/list/user',
		method: 'get',
		params: http.queryData()
	})
}
export function getList(data = {}) {
	return http({
		url: BASE_CONTENT + '/list',
		method: 'get',
		params: http.queryData()
	})
}